package com.yiyi.credit.manage.abutment.client;


import com.yiyi.credit.manage.abutment.common.bean.Response;
import com.yiyi.credit.manage.model.dto.SysResourceDto;
import com.yiyi.credit.manage.model.entity.CookieInfo;
import com.yiyi.credit.manage.model.vo.PaginationVo;
import com.yiyi.credit.manage.model.vo.SysResourceVo;
import com.yiyi.credit.manage.model.vo.SysUserVo;
import com.yiyi.credit.manage.model.vo.UserInfoVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Component
public class UserAuthorityManagementHystrix implements UserAuthorityManagementClient{

    private static final Logger logger = LoggerFactory.getLogger(UserAuthorityManagementHystrix.class);

    @Override
    public Long getSysInfoId(@RequestParam(value = "sysInfoName") String sysInfoName){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysInfoId");
        return null;
    }

    @Override
    public Map<String, String> getPhoneByUserName(@RequestParam(value = "userName") String userName){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getPhoneByUserName");
        return null;
    }


    @Override
    public Response<CookieInfo> login(@RequestParam(value = "userName") String userName,
                                      @RequestParam(value = "password") String password){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!login");
        return null;
    }

    @Override
    public Response<List<SysResourceVo>> getSysUserPermission(@RequestParam(value = "userId") Long userId,
                                                              @RequestParam(value = "sysInfoId") Long sysInfoId){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysUserPermission");
        return null;
    }

    @Override
    public Response<SysResourceDto> getSysChildNodePermission(@RequestParam(value = "userId") Long userId,
                                                              @RequestParam(value = "sysInfoId") Long sysInfoId,
                                                              @RequestParam(value = "pid", defaultValue = "-1") Long pid,
                                                              @RequestParam(value = "whetherAllChild") boolean whetherAllChild){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysChildNodePermission");
        return null;
    }

    @Override
    public String getEmailByUsername(@RequestParam("username") String username){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getEmailByUsername");
        return null;
    }

    @Override
    public Response<SysUserVo> getSysUserInfo(@RequestParam(value = "sysUserId") Long sysUserId){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysUserInfo");
        return null;
    }

    @Override
    public Response<SysResourceDto> getSysUserPermissionByUrl(@RequestParam(value = "userId") Long userId,
                                                              @RequestParam(value = "sysInfoId") Long sysInfoId,
                                                              @RequestParam(value = "url") String url){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysUserPermissionByUrl");
        return null;
    }

    @Override
    public Response changePwdSysUser(@RequestParam(name = "userName") String userName, @RequestParam(name = "oldPwd") String oldPwd,
                                     @RequestParam(name = "newPwd") String newPwd){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!changePwdSysUser");
        return null;
    }

    @Override
    public  Response<UserInfoVo> getSysUserInfoByToken(@RequestParam(name = "token") String token,
                                                       @RequestParam(value = "sysInfoId") Long sysInfoId){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysUserInfoByToken");
        return null;
    }

    @Override
    public  Object updatePhone(@RequestParam(value = "sysInfoId") Long sysInfoId,
                               @RequestParam(value = "userName") String userName,
                               @RequestParam(value = "password") String passWord,
                               @RequestParam(value = "newPhone") String newPhone){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!updatePhone");
        return null;
    }

    @Override
    public  Response authToken(@RequestParam(name = "token") String token){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!authToken");
        return null;
    }

    @Override
    public  Long getSysUserId(@RequestParam(value = "userName") String userName){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getSysUserId");
        return null;
    }

    @Override
    public PaginationVo getUserAllInfoList(@RequestParam(value = "sysInfoId") Long sysInfoId,
                                           @RequestParam(value = "userName") String userName,
                                           @RequestParam(value = "realName") String realName,
                                           @RequestParam(value = "roleNameId") Long roleNameId,
                                           @RequestParam(value = "status") Long status,
                                           @RequestParam(value = "pageIndex") int pageIndex,
                                           @RequestParam(value = "pageSize") int pageSize){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getUserAllInfoList");
        return null;
    }

    @Override
    public List<UserInfoVo> getUserInfoByIds(@RequestParam(value = "sysInfoId") Long sysInfoId,
                                             @RequestParam(value = "ids") String ids){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!getUserAllInfoList");
        return null;
    }

    @Override
    public Response logout(@RequestParam(name = "tokenVal") String tokenVal){
        logger.info("sorry!!!!!!!!!!!!!!!!!!!!!!logout");
        return null;
    }

}
